The present invention relates to computer graphics applications.
A page in an electronic document may include various types of objects, including text, line art, and images. An electronic document can generally be created and edited by a user on a computer using a computer graphics application. Most computer graphics applications can also be used to produce (directly or indirectly) printed output defined by the electronic document. Examples of computer graphics applications include the Adobe Illustrator® and Photoshop® applications, both available from Adobe Systems Incorporated of San Jose, Calif. Objects in an electronic document may be represented in vector form, raster form, or in hybrid forms.
A color page in an electronic document includes information about the colors used in the page. Colors are defined in a color space, which provides a data representation of a range of colors in terms of basic color components. The specific color components will vary depending on the color system used for the process inks in the printing system. For example, in the CMYK color system, colors are represented as combinations of cyan (C), magenta (M), yellow (Y), and black (or “key”) (K).
To create a physical page printed with inks and corresponding to a color page in an electronic document, data representations of colors are used to create color separations. The color separations are generally created by computer programs running on general or special purpose systems. Generally, each color separation used by an output device corresponds to a color component of the color system used by the device. For example, data representations of colors in output generated for an imagesetter using a CMYK color system are used to create color separations for cyan, magenta, yellow, and black, with each separation indicating regions where the corresponding ink should be applied, as well as the amount of ink that should be applied.
Misregistration or inaccuracies in the physical placement of two or more colors with respect to each other on a printed sheet can cause unintentional gaps or overlaps at edges of color regions on an output page. Misregistration can occur for a variety of reasons relating to the performance of people, machines, and materials.
To minimize the effects of misregistration, a technique known as trapping is used to adjust the shapes of color regions by spreading (expanding) some color regions to prevent gaps, and choking (contracting) other color regions to prevent overlaps. In determining whether an edge of a color region requires a trap, trapping systems evaluate the color on both sides of the edge. A method and apparatus for electronically trapping a printed color page in a desktop publishing, layout, graphics, or similar applications program is set forth in U.S. Pat. No. 5,295,236, entitled “Applying Traps to a Printed Page Specified in a Page Description Language Format,” assigned to the assignee of the present invention and hereby incorporated in its entirety. A method and apparatus for vector map representation of page information to perform trapping is set forth in U.S. Pat. No. 6,031,544, entitled “Vector Map Planarization and Trapping,” also assigned to the assignee of the present invention and hereby incorporated in its entirety.
When trapping a vector object to another vector object, the color on both sides of the edge separating the vector objects can be determined by planarizing the vector objects. A vector object may alternatively intersect a raster image that is made up by a plurality of image pixels. If a vector object intersects a raster image, the edge between the vector object and raster image (vector-image edge) will have the vector color on one side and image color on the other side. The actual colors along the vector-image edge can be determined by rendering the raster image and vector object into a pixel buffer at device resolution and using raster based edge detection to accurately determine the edges and colors. While this method guarantees high fidelity vector-image edge color determination, it has an associated computational overhead of rasterizing the data at device resolution and requires extra memory for a raster buffer. Furthermore, this method is likely to produce edges that are jagged (also referred to as pixilation), placing additional complexity on the trapping process to either smooth the jagged edge or handle the extra data points to accommodate the pixilation.
An alternative method determines the color along the image side of a vector-image edge by splitting the edge into smaller edges and identifying the image edge color as the color of the image pixel intersected by the edge. However, the edge splitting method can lead to inaccurate image edge color determinations because the image pixel color seen on the image side of the edge when rendered in device space may not be the color of the image pixel intersected by the edge.
The edge splitting method does not take into account the different rendering rules for vector objects and images. Vector objects are typically rendered into the device space (having a grid of device pixels) using an overscan rule, which assigns the vector object's color to each device pixel that is intersected by the object. A vector object is therefore an example of an overscan object. A raster image, on the other hand, is a type of centerscan object. Accordingly, raster images are rendered using a centerscan rule which assigns a device pixel the color of the image pixel to which the center of the device pixel maps.
In addition to the different rendering rules, images and vector objects in an electronic document are generally rendered in a particular order, the paint order. If a vector object has a higher paint order than an image, that is, the vector object is rendered after the image, the overscan rule will determine the color of the device pixel intersected by the edge. Likewise, if the image has a higher paint order, the centerscan rule will determine the color of the device pixel intersected by the edge. It follows from the different rendering rules that the color on the image side of the edge is not always the color of the image pixel intersected by the edge. Therefore, the edge splitting method may lead to inaccurate edge color determinations resulting in incorrect trap decisions and incorrectly colored traps. The same problem will occur when trapping any overscan object to a centerscan object or when trapping a centerscan object to another centerscan object.
Another problem with the edge splitting method occurs when the raster image resolution is greater than the device resolution, thus more than one image pixel will map to each device pixel. In this case, the edge splitting method will produce more split edges than needed. The excess split edges may be created with colors that are not present in the image when it is rendered in the output device, thus resulting in inaccurate trapping decisions and incorrectly colored traps.